a=[99,15,88,77,66,45,87]
for i in range(len(a)):
    for j in range(i,len(a)):
        if a[i]>a[j]:
            a[i],a[j]=a[j],a[i]
print(a)
print('********************')
a=[99,15,88,77,66,45,87]
for i in range(len(a)-1):
    for j in range(0,len(a)-i-1):
        try:
            if a[j]>a[j+1]:
                a[j],a[j+1]=a[j+1],a[j]

        except:
            pass
print(a)


